This invention relates to electronic meters and, more particularly, to methods and apparatus for transferring data between a digital signal processor, memory and a microcontroller in electronic energy meters.
Electronic energy meters have been developed for measuring the consumption of electrical energy on power lines. One architecture utilizes a digital signal processor for calculating various electrical parameters based on measured values of voltage and current, and a microcontroller for controlling the storage, display and communication of the electrical parameters calculated by the digital signal processor.
The parameter values calculated by the digital signal processor must be transferred to the microcontroller for storage, display and communication in an efficient and low cost manner. Typically, the digital signal processor and the microcontroller operate at different speeds. Conventional systems typically implement communication between two processors through a direct synchronous communication port, which limits communication speed, or by interfacing the processors on a data bus, which requires additional hardware, particularly when the processors are running at different speeds.
Accordingly, there is a need for efficient and low cost methods and apparatus for transferring data between a digital signal processor and a microcontroller in electronic energy meters.
According to a first aspect of the invention, an electronic meter is provided. The electronic meter comprises a sensing circuit for sensing one or more values of a waveform, a memory having a memory bus, a digital signal processor coupled to the memory for calculating at least one parameter value of the waveform in response to the sensed values, and a microcontroller coupled to the memory for performing control functions of the electronic meter. The digital signal processor comprises means for generating a bus request when access to the memory is required. The microcontroller comprises means for granting access to the memory in response to the bus request from the digital signal processor.
The sensing circuit may be configured for sensing and digitizing voltage and current values of a polyphase power line. The digital signal processor may comprise means for calculating one or more parameter values of the polyphase power line in response to the digitized voltage and current values and means for writing the calculated parameter values to the memory. The microcontroller may comprise means for reading the calculated parameter values from the memory when the microcontroller has access to the memory and means for supplying the calculated parameter values to a storage or display device.
The digital signal processor may generate a bus request interrupt to the microcontroller. The digital signal processor may further comprise means for clearing the bus request interrupt when the memory access operation is complete. The microcontroller may generate a grant access interrupt to the digital signal processor. The microcontroller may further comprise means for clearing the grant access interrupt after a predetermined timeout period. The digital signal processor and the microcontroller may operate a different frequencies.
According to another aspect of the invention, a method for operating an electronic meter is provided. The electronic meter comprises a sensing circuit for sensing one or more values of a waveform, a memory having a memory bus, a digital signal processor coupled to the memory for calculating at least one parameter value of the waveform in response to the sensed values, and a microcontroller coupled to the memory for performing control functions of the electronic meter. The method comprises the steps of the digital signal processor generating a bus request when access to the memory is required and the microcontroller granting access to the memory in response to the bus request from the digital signal processor.
According to a further aspect of the invention, an electronic energy meter is provided. The electronic energy meter comprises a sensing circuit for a sensing voltage and current values of a polyphase power line, a memory having a memory bus, a digital signal processor coupled to the memory for calculating parameter values of the polyphase power line in response to the sensed voltage and current values, and a microcontroller coupled to the memory for performing control functions of the electronic energy meter. The digital signal processor comprises means for generating a bus request when access to the memory is required. The microcontroller comprises means for granting access to the memory in response to the bus request from the digital signal processor.